home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows1 / ew100.zip / FILES1.LZH / EWUSER.INC < prev    next >
Text File  |  1992-11-29  |  10KB  |  295 lines

  1. {-EW API - Useful constants and types used in Extension DLLs}
  2.  
  3. const
  4.  
  5. {-Command codes used to identify EW functions within hooks}
  6.  
  7. ew_MFOpen            =  201;
  8. ew_MFNew             =  202;
  9. ew_MFClone           =  203;
  10. ew_MFGet             =  204;
  11. ew_MFWrite           =  205;
  12. ew_MFAppend          =  206;
  13. ew_MFSave            =  207;
  14. ew_MFSaveAs          =  208;
  15. ew_MFRefresh         =  209;
  16. ew_MFGrep            =  210;
  17. ew_MFAssociate       =  211;
  18. ew_MFCC              =  215;
  19. ew_MFPrint           =  217;
  20. ew_MFPrintSetup      =  218;
  21. ew_MFPageSetup       =  219;
  22. ew_MFExit            =  221;
  23. ew_MFExitEditor      =  222;
  24.  
  25. ew_MEUndo            =  301;
  26. ew_MEClearUndo       =  302;
  27. ew_MECut             =  304;
  28. ew_MECutAppend       =  305;
  29. ew_MECopy            =  306;
  30. ew_MECopyAppend      =  307;
  31. ew_MEPasteIns        =  308;
  32. ew_MEPasteOvr        =  309;
  33. ew_MEClear           =  311;
  34. ew_MESelectAll       =  312;
  35. ew_MEDelete          =  314;
  36. ew_MEDraw            =  316;
  37. ew_MERecordMac       =  318;
  38. ew_MELoadMac         =  319;
  39. ew_MESaveMac         =  320;
  40. ew_MEReplayMac       =  321;
  41. ew_MEAsciiMode       =  323;
  42.  
  43. ew_MBSet             =  401;
  44. ew_MBGotoMark1       =  403;
  45. ew_MBGotoMark2       =  404;
  46. ew_MBGotoMark3       =  405;
  47. ew_MBRemoveMark1     =  407;
  48. ew_MBRemoveMark2     =  408;
  49. ew_MBRemoveMark3     =  409;
  50. ew_MBGoto            =  411;
  51. ew_MBGotoSel         =  412;
  52. ew_MBCompare         =  414;
  53.  
  54. ew_MSFind            =  501;
  55. ew_MSRepeatFind      =  502;
  56. ew_MSFindWord        =  503;
  57.  
  58. ew_MCCompile         =  601;
  59. ew_MCMake            =  602;
  60. ew_MCRebuild         =  603;
  61. ew_MCDebug           =  604;
  62. ew_MCExecute         =  605;
  63. ew_MCNext            =  607;
  64. ew_MCPrevious        =  608;
  65. ew_MCCommands        =  610;
  66.  
  67. ew_MLSet             =  701;
  68. ew_MLSaveCnf         =  702;
  69. ew_MLLoadCnf         =  703;
  70. ew_MLAssign          =  705;
  71. ew_MLExpansion       =  707;
  72.  
  73. ew_MWRibbon          =  801;
  74. ew_MWHide            =  803;
  75. ew_MWTile            =  805;
  76. ew_MWCascade         =  806;
  77. ew_MWHideAll         =  807;
  78. ew_MWIconizeAll      =  808;
  79. ew_MWScrolling       =  810;
  80. ew_MWFont            =  812;
  81.  
  82. ew_MULoadExt         =  901;
  83. ew_MUUnloadExt       =  902;
  84. ew_MUExecuteExt      =  903;
  85. ew_MUAutoLoad        =  904;
  86. ew_DefineMenu        =  906;
  87.  
  88. ew_AddTab            = 9001;
  89. ew_BlockShift        = 9010;
  90. ew_BeginLine         = 9011;
  91. ew_CasePrimUpper     = 9012;
  92. ew_CasePrimLower     = 9013;
  93. ew_CheckBrace        = 9014;
  94. ew_ClearLine         = 9015;
  95. ew_DeleteCurLine     = 9016;
  96. ew_DeleteEOL         = 9017;
  97. ew_DeleteLeftChar    = 9018;
  98. ew_DeleteWord        = 9019;
  99. ew_EndLine           = 9020;
  100. ew_Enter             = 9021;
  101. ew_GoNextPar         = 9022;
  102. ew_GoNextTab         = 9023;
  103. ew_GoPrevPar         = 9024;
  104. ew_GoPrevTab         = 9025;
  105. ew_InputPause        = 9026;
  106. ew_InsertBrace       = 9027;
  107. ew_InsertDate        = 9028;
  108. ew_InsertFilename    = 9029;
  109. ew_InsertTime        = 9030;
  110. ew_JoinLine          = 9031;
  111. ew_LoadUserFile      = 9032;
  112. ew_NextCol           = 9041;
  113. ew_NextLine          = 9042;
  114. ew_NextWord          = 9043;
  115. ew_PageBottom        = 9044;
  116. ew_PageTop           = 9045;
  117. ew_PageScrollHLeft   = 9046;
  118. ew_PageScrollHRight  = 9047;
  119. ew_PageScrollVDown   = 9048;
  120. ew_PageScrollVUp     = 9049;
  121. ew_PrevCol           = 9050;
  122. ew_PrevLine          = 9051;
  123. ew_PrevWord          = 9052;
  124. ew_Reflow            = 9054;
  125. ew_RemoveTab         = 9055;
  126. ew_SetCurLine2Bottom = 9056;
  127. ew_SetCurLine2Middle = 9057;
  128. ew_SetCurLine2Top    = 9058;
  129. ew_ShiftTextRight    = 9059;
  130. ew_SplitLine         = 9072;
  131. ew_StepScrollDown    = 9073;
  132. ew_StepScrollLeft    = 9074;
  133. ew_StepScrollRight   = 9075;
  134. ew_StepScrollUp      = 9076;
  135. ew_StripFlow         = 9077;
  136. ew_SumBlock          = 9078;
  137. ew_TextBoundBegin    = 9079;
  138. ew_TextBoundEnd      = 9080;
  139. ew_TextToCursor      = 9081;
  140. ew_ToggleIns         = 9082;
  141. ew_UpcaseFirst       = 9083;
  142. ew_UserBlockSort     = 9084;
  143. ew_UserFillBlock     = 9085;
  144.  
  145. {-Value that should be returned by EWExecute or by a hook if the extension  }
  146. { failed. Otherwise return 0 or leave the original EW return code unchanged.}
  147.  
  148. ewerr_EXTFAILED = 300;
  149.  
  150. {-Values returned by EWCallUserExt if the extension could not be executed}
  151.  
  152. ewerr_NOSUCHEXTENSION = 301;
  153. ewerr_NOEXECEXPORTED  = 302;
  154.  
  155. {-Values that may be returned after execution of an editing function}
  156.  
  157. ewerr_CANTMOVE         = 351;  { The cursor could not be moved as requested }
  158. ewerr_CANTPROCEED      = 352;  { The function could not be executed }
  159.  
  160. {-Values passed by EWSetHook and EWRemoveHook to EW}
  161.  
  162. EWHook_FunctionEntry    = 0;
  163. EWHook_FunctionExit     = 1;
  164. EWHook_KeyboardEntry    = 2;
  165. EWHook_PaintEntry       = 3;
  166. EWHook_LoadExit         = 4;
  167. EWHook_Notify           = 5;
  168.  
  169. {-Values passed by EW to the callback notification hook to identify the event}
  170.  
  171. EWNotify_ExitEditor     = 0;
  172. EWNotify_CreateClone    = 1;
  173. EWNotify_DestroyClone   = 2;
  174. EWNotify_FileAutosaved  = 3;
  175. EWNotify_FontChanged    = 4;
  176. EWNotify_PosChanged     = 5;
  177. EWNotify_ActWinChanged  = 6;
  178. EWNotify_CharEntry      = 7;
  179. EWNotify_CharExit       = 8;
  180.  
  181. {-Possible assignment modes when using EWAddMenuEntry}
  182.  
  183. EWMNU_Program   = 0;
  184. EWMNU_Command   = 1;
  185. EWMNU_Macro     = 2;
  186. EWMNU_Extension = 3;
  187.  
  188. {-Global Flags constants}
  189.  
  190.   EWGlbShow              =  1;     { Show edit window when created }
  191.   EWGlbShowWild          =  2;     { Show windows created with wildcards }
  192.   EWGlbMinCC             =  3;     { Iconize CC after creating window }
  193.   EWGlbReShowCC          =  4;     { Reshow CC after edit window creation }
  194.   EWGlbDispShortCuts     =  5;     { Display shortcuts in menus }
  195.   EWGlbReplaceSel        =  6;     { Typing replace Selection }
  196.   EWGlbAddOnLast         =  7;     { Insert with  on last line }
  197.   EWGlbFormatFrom        =  8;     { Format from current line only }
  198.   EWGlbExpansion         =  9;     { Syntax Expansion enabled }
  199.   EWGlbAutoMacros        = 10;     { Auto Macros enabled }
  200.   EWGlbEnterClassic      = 11;     { Split line with Enter }
  201.   EWGlbInsert            = 12;     { Insert on by default }
  202.   EWGlbAutoScroll        = 13;     { Use autoscroll mode }
  203.   EWGlbAlarm             = 14;     { Beep on error }
  204.   EWGlbLog               = 15;     { Maintain session logging }
  205.   EWGlbBak               = 16;     { Create .BAK flags }
  206.   EWGlbWarning           = 17;     { Warning before file overwrite }
  207.   EWGlbLoadList          = 18;     { @xxxx.xxx files are lists }
  208.   EWGlbAutosaveOpt       = 19;     { Autosave options }
  209.   EWGlbAutosave          = 20;     { Autosave files }
  210.   EWGlbDeleteOut         = 21;     { Suppress .ERR file }
  211.   EWGlbGrepRegular       = 22;     { Grep uses Boolean Search }
  212.   EWGlbGrepAnsi          = 23;     { Grep uses Ansi charset }
  213.   EWGlbGrepCase          = 24;     { Grep makes a case sensitive search }
  214.   EWGlbGrepSubDir        = 25;     { Grep searches in subdirectories }
  215.  
  216. {-Local Flags constants}
  217.  
  218.   EWLclbBlank       =  1;          { Strip trailing blanks }
  219.   EWLclbAutoBack    =  2;          { Backspace behaviour }
  220.   EWLclbAutoTab     =  4;          { Autotab flag }
  221.   EWLclbAutoInsert  =  5;          { AutoInsert braces }
  222.   EWLclbAutoComp    =  6;          { AutoCompress tabs }
  223.   EWLclbWordWrap    =  7;          { Wordwrap }
  224.   EWLclbJustify     =  8;          { Right justification }
  225.   EWLclbLoadAscii   =  9;          { Loaded file supposed to be Ascii file }
  226.   EWLclbSaveAscii   = 10;          { Save file in Ascii format }
  227.   EWLclbEOF         = 11;          { Add a Ctrl Z at the end of the file }
  228.  
  229. {-Search Flags constants}
  230.  
  231.   EWSearchbBackward  =  1;         { Backward search }
  232.   EWSearchbBlock     =  2;         { Search within marked block only }
  233.   EWSearchbCase      =  3;         { Case sensitive search }
  234.   EWSearchbKeepCase  =  4;         { Keep case type when replacing string }
  235.   EWSearchbGlobal    =  5;         { Global Search }
  236.   EWSearchbGothru    =  6;         { Replace without prompting }
  237.   EWSearchbRegular   =  7;         { Boolean search flag }
  238.   EWSearchbWord      =  8;         { Word-only search }
  239.   EWSearchbAcross    =  9;         { Search across edited files }
  240.  
  241. {-Compile command codes}
  242.  
  243.   EWCompileCommand   =  0;
  244.   EWMakeCommand      =  1;
  245.   EWBuildCommand     =  2;
  246.   EWDebugCommand     =  3;
  247.   EWExecuteCommand   =  4;
  248.  
  249. {-Macro string codes}
  250.  
  251.   EWMacro_Time       =  0;
  252.   EWMacro_Date       =  1;
  253.   EWMacro_FileName   =  2;
  254.  
  255. {-Position codes}
  256.  
  257.   EWPosition_Top     = 0;
  258.   EWPosition_Middle  = 1;
  259.   EWPosition_Bottom  = 2;
  260.  
  261. {-Selection modes}
  262.  
  263.   EWSelection_None   = 0;
  264.   EWSelection_Line   = 1;
  265.   EWSelection_Stream = 2;
  266.   EWSelection_Block  = 3;
  267.  
  268. {-Write modes for EWWriteBlock}
  269.  
  270.   EWWrite_ReWrite    = 1;
  271.   EWWrite_Append     = 2;
  272.  
  273. type
  274.  
  275.   PSelStruct = ^TSelStruct;
  276.   TSelStruct = record
  277.     SelType       : word;
  278.     FirstSelLine,
  279.     LastSelLine,
  280.     FirstSelCol,
  281.     LastSelCol,
  282.     StartSelIndex,
  283.     EndSelIndex   : integer;
  284.   end;
  285.  
  286.   TEnumEditorsProc = procedure(EditorId : longint; Name : PChar);
  287.   TEnumClonesProc  = procedure(CloneHandle : THandle; CloneId : byte);
  288.   TFuncEntryHook   = function(command : word) : integer;
  289.   TFuncExitHook    = function(command : word; pRetcode : PInteger) : integer;
  290.   TKbdEntryHook    = function(Msg : TMsg) : integer;
  291.   TPaintEntryHook  = function(DC : HDC; PaintInfo : PPaintStruct; SelInfo : PSelStruct; hWindow : word) : integer;
  292.   TLoadExitHook    = function(EditorId : longint) : integer;
  293.   TNotifyHook      = function(eventcode : word; wParam : word; lParam : longint) : integer;
  294.   TExecFunc        = function : integer;
  295.